package iti0011;

import java.net.*;
import java.io.*;

public class URLReader {
	
	// class constructor
	URLReader() {}
	
	public static String readURL(URL initialURL) throws Exception {
		String output = "";
		String line = null;
		BufferedReader in = new BufferedReader(new InputStreamReader(initialURL.openStream()));
		while ((line = in.readLine()) != null) {
//		System.out.println(output);
		output += line;
		in.close();
		}
		return output;
	}
}